import { MenuInfo, ResourceGroupList } from '#/comm/menu'

export const getMenuResultInfo = (): MenuInfo => {
  const customizeData = [
    {
      id: '2',
      menuCode: 'customize',
      menuName: '组件',
      href: '/customize',
      component: '',
      parentId: '0',
      menuIcon: '#iconcedaohang_jiaowuxitong',
    },
    {
      id: '20',
      menuCode: 'table',
      menuName: '表格',
      href: '/customize/table',
      component: '/customize/table/index',
      parentId: '2',
      menuIcon: '',
    },
    {
      id: '21',
      menuCode: 'message',
      menuName: '消息提示',
      href: '/customize/message',
      component: '/customize/message/index',
      parentId: '2',
      menuIcon: '',
    },
    {
      id: '22',
      menuCode: 'tabs',
      menuName: 'tabs',
      href: '/customize/tabs',
      component: '/customize/tabs/index',
      parentId: '2',
      menuIcon: '',
    },
    {
      id: '23',
      menuCode: 'tree',
      menuName: 'tree',
      href: '/customize/tree',
      component: '/customize/tree/index',
      parentId: '2',
      menuIcon: '',
    },
    {
      id: '24',
      menuCode: 'dialog',
      menuName: 'dialog',
      href: '/customize/dialog',
      component: '/customize/dialog/index',
      parentId: '2',
      menuIcon: '',
    },
    {
      id: '25',
      menuCode: 'form',
      menuName: 'form',
      href: '/customize/form',
      component: '/customize/form/index',
      parentId: '2',
      menuIcon: '',
    },
  ]
  const AIData = [
    {
      id: '3',
      menuCode: 'AI',
      menuName: 'AI',
      href: '/ai',
      component: '',
      parentId: '0',
      menuIcon: '#iconcedaohang_jiaowuxitong',
    },
    {
      id: '30',
      menuCode: 'tyqw',
      menuName: 'ty',
      href: '/ai/ty',
      component: '/ai/ty/index',
      parentId: '3',
      menuIcon: '',
    },
  ]
  const reulst = {
    menuList: [
      {
        id: '1',
        menuCode: 'home',
        menuName: '首页',
        href: '/',
        component: '',
        parentId: '0',
        menuIcon: '#iconcedaohang_jiaowuxitong',
      },
      ...customizeData,
      ...AIData,
    ],
  }
  const resourceGroupList: ResourceGroupList[] = []
  reulst.menuList.forEach((item: any) => resourceGroupList.push(item.menuCode))
  return {
    menuList: reulst.menuList,
    resourceGroupList,
  }
}
